export class DomBase<T> {
    value: T;
    key: string;
    label: string;
    required: boolean;
    order: number;
    controlType: string;
    radios: any[];

    constructor(obj: {
        value?: T,
        key?: string,
        label?: string,
        required?: boolean,
        order?: number,
        controlType?: string,
        radios?: any[]
    } = {}) {
        this.value = obj.value;
        this.key = obj.key || '';
        this.label = obj.label || '';
        this.required = !!obj.required;
        this.order = obj.order === undefined ? 1 : obj.order;
        this.controlType = obj.controlType || '';
        this.radios = obj.radios || [];
    }
}